import ReactDOM from "react-dom";
import App from "./test";
import { Provider } from "react-redux";
import { createStore } from "redux";

let initData = {
    count: 0
}

function reducer(state = initData, action) {
    switch (action.type) {
        case "add":
            return {...state,count: state.count + 1}        
        default:
            return state;
    }
}

let store = createStore(reducer);
ReactDOM.render(<Provider store={store}><App></App></Provider>, document.getElementById("root"));